package cn.gs.serializable.old;

// @author gs
import cn.gs.util.stream.TokenReader;
import java.io.IOException;
import java.io.Writer;

public interface ISerialEntity {

    @Override
    String toString();
    
    String toString(String prefix);
    
    Object deserialize();

    <T> T deserialize(Class<T> clazz);

    boolean serialize(Object o);

    void write(Writer writer) throws IOException;

    boolean read(TokenReader reader) throws IOException, ClassNotFoundException;
}
